package com.myjoje.util;

import com.myjoje.base.BaseUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * easyexcel工具类
 */
public class EasyExcelUtil {

    /**
     * 获取Excel标题
     */
    public static List<List<String>> getExcelHeader(String headers) {
        if (BaseUtil.isNotEmpty(headers)) {
            String[] arr = headers.split(",");
            List list = new ArrayList();
            List head;
            for (int i = 0; i < arr.length; i++) {
                head = new ArrayList();
                head.add(arr[i]);
                list.add(head);
            }
            return list;
        }
        throw new RuntimeException("BaseService getExcelHeader method headers param is empty");
    }



}
